package com.example.ddcoursequery;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by admin on 2015/12/14.
 */
public class MyDbHelper extends SQLiteOpenHelper {
    private String teacher_table = "create table teacher(teacher_id text primary key,teacher_name text,teacher_dep text,teacher_sex text,teacher_title text,teacher_cached text);";
    private String course_table = "create table course(teacher_id text,semester text,weekday text,squence text,content text,classroom text,classname text,number text);";

    public MyDbHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        sqLiteDatabase.execSQL(teacher_table);
        sqLiteDatabase.execSQL(course_table);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
